home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_HDF.idb / usr / freeware / include / hdf / local_nc.h.z / local_nc.h
Encoding:
C/C++ Source or Header  |  1999-01-26  |  16.3 KB  |  649 lines

  1. /*
  2.  *    Copyright 1993, University Corporation for Atmospheric Research
  3.  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  4.  */
  5. /* $Id: local_nc.h,v 1.49 1998/02/02 21:50:52 smitchel Exp $ */
  6. #ifndef _LOCAL_NC_
  7. #define _LOCAL_NC_
  8.  
  9. /*
  10.  *    netcdf library 'private' data structures, objects and interfaces
  11.  */
  12.  
  13. #if (defined macintosh) || (defined MPW) || (defined __MWERKS__)
  14. #ifndef HDF
  15. #define HDF  /* For Mac we need to define this, to avoid putting on compile line */
  16. #endif
  17. #define NO_SYS_XDR_INC /* use stuff in "::xdr" */
  18. #define NO_ACCESS
  19. #define NO_GETPID
  20. #endif /* non command line compilers */
  21.  
  22. #include    <stddef.h> /* size_t */
  23. #include    <stdio.h> /* FILENAME_MAX */
  24. #if (defined MPW)
  25. #include   <memory.h>
  26. #endif /* MPW */
  27.  
  28. #ifndef FILENAME_MAX
  29. #define FILENAME_MAX  255
  30. #endif
  31.  
  32. /* Do we have systeme XDR files */
  33. #ifndef  NO_SYS_XDR_INC 
  34. #ifdef VMS
  35. #    define  STDC_INCLUDES
  36. #endif   /* VMS */
  37. #ifdef __ultrix
  38. #define GCC_FIX
  39. #endif /* __ultrix */
  40. #include    <rpc/types.h>
  41. #ifdef __ultrix
  42. #undef GCC_FIX
  43. #endif /* __ultrix */
  44. #include    <rpc/xdr.h>
  45. #else    /* NO_SYS_XDR_INC */
  46. #if defined(macintosh) || defined (SYMANTEC_C)
  47.      /* For the mac reference types.h specifically
  48.         because we don't want it to pick up the system one */
  49. #include      "::xdr:types.h"  /* "../xdr/types.h" */
  50. #include      "::xdr:xdr.h"    /* "../xdr/xdr.h" */
  51. #else /* !macintosh */
  52. #include      <types.h>  /* <types.h */
  53. #include      <xdr.h>    /* <xdr.h> */
  54. #endif /* !macintosh */
  55. #endif /* NO_SYSTEM_XDR_INCLUDES */
  56.  
  57. #include    "netcdf.h" /* needed for defs of nc_type, ncvoid, ... */
  58.  
  59. /* ptr argument type in internal functions */
  60. #define Void    char
  61.  
  62. /*
  63. ** Include HDF stuff
  64. */
  65. #ifdef HDF
  66.  
  67. #include "hdf.h"
  68. #include "vg.h"
  69. #include "hfile.h"
  70.  
  71. #define ATTR_TAG  DFTAG_VH
  72. #define DIM_TAG   DFTAG_VG
  73. #define VAR_TAG   DFTAG_VG
  74. #define DATA_TAG  DFTAG_SD
  75. #define BOGUS_TAG ((uint16) 721)
  76.  
  77. #if 0
  78. #define ATTRIBUTE         "Attr0.0"
  79. #define VARIABLE          "Var0.0"
  80. #define DIMENSION         "Dim0.0"
  81. #define UDIMENSION        "UDim0.0"
  82. #define DIM_VALS          "DimVal0.0" 
  83. #define DIM_VALS01        "DimVal0.1"
  84. #define CDF               "CDF0.0"
  85. /* DATA is defined in DTM. Change DATA to DATA0 *
  86. #define DATA              "Data0.0"
  87. */
  88. #define DATA0             "Data0.0"
  89. #define ATTR_FIELD_NAME   "VALUES"
  90. #endif
  91.  
  92. #define DIMVAL_VERSION00  0  /* <dimsize> fake values */
  93. #define DIMVAL_VERSION01  1  /* 1 elt with value of <dimsize>  */
  94. #define BLOCK_MULT  64    /* multiplier for bytes in linked blocks */
  95. #define MAX_BLOCK_SIZE  65536    /* maximum size of block in linked blocks */
  96. #define BLOCK_COUNT 128   /* size of linked block pointer objects  */
  97.  
  98. #endif /* HDF */
  99.  
  100. /* from cdflib.h CDF 2.3 */
  101. #ifndef MAX_VXR_ENTRIES
  102. #define MAX_VXR_ENTRIES                 10
  103. #endif /* MAX_VXR_ENTRIES */
  104.  
  105. #ifdef HDF
  106. /* VIX record for CDF variable data storage */
  107. typedef struct vix_t_def {
  108.     int32              nEntries;                    /* number of entries in this vix */
  109.     int32              nUsed;                       /* number of entries containing valid data */
  110.     int32              firstRec[MAX_VXR_ENTRIES];   /* number of first records */
  111.     int32              lastRec[MAX_VXR_ENTRIES];    /* number of last records */
  112.     int32              offset[MAX_VXR_ENTRIES];     /* file offset of records */
  113.     struct vix_t_def * next;                        /* next one in line */
  114. } vix_t;
  115. #endif /* HDF */
  116.  
  117. /* like, a discriminated union in the sense of xdr */
  118. typedef struct {
  119.     nc_type type ;        /* the discriminant */
  120.     size_t len ;        /* the total length originally allocated */
  121.     size_t szof ;        /* sizeof each value */
  122.     unsigned count ;    /* length of the array */
  123.     Void *values ;        /* the actual data */
  124. } NC_array ;
  125.  
  126. /* Counted string for names and such */
  127. /* 
  128.  
  129.   count is the actual size of the buffer for the string
  130.   len is the length of the string in the buffer
  131.   
  132.   count != len when a string is resized to something smaller
  133.  
  134. */
  135. #ifdef HDF
  136. #define NC_compare_string(s1,s2) ((s1)->hash!=(s2)->hash ? 1 : HDstrcmp((s1)->values,(s2)->values))
  137. #endif /* HDF */
  138.  
  139. typedef struct {
  140.     unsigned count ;
  141.     unsigned len ; 
  142. #ifdef HDF
  143.     uint32 hash;        /* [non-perfect] hash value for faster comparisons */
  144. #endif /* HDF */
  145.     char *values ;
  146. } NC_string ;
  147.  
  148. /* Counted array of ints for assoc list */
  149. typedef struct {
  150.     unsigned count ;
  151.     int *values ;
  152. } NC_iarray ;
  153.  
  154. /* NC dimension stucture */
  155. typedef struct {
  156.     NC_string *name ;
  157.     long size ;
  158. #ifdef HDF
  159.     int32 dim00_compat;   /* compatible with Dim0.0 */
  160.     int32 vgid;   /* id of the Vgroup representing this dimension */
  161.     int32 count;  /* Number of pointers to this dimension */
  162. #endif
  163. } NC_dim ;
  164.  
  165. /* NC attribute */
  166. typedef struct {
  167.     NC_string    *name ;
  168.     NC_array    *data ;
  169. #ifdef HDF
  170.     int32           HDFtype; /* it should be in NC_array *data. However, */
  171.                              /* NC.dims and NC.vars are NC_array too. */
  172. #endif
  173. } NC_attr ;
  174.  
  175. typedef struct {
  176.     char path[FILENAME_MAX + 1] ;
  177.     unsigned flags ;
  178.     XDR *xdrs ;
  179.     long begin_rec ; /* (off_t) postion of the first 'record' */
  180.     unsigned long recsize ; /* length of 'record' */
  181.     int redefid ;
  182.     /* below gets xdr'd */
  183.     unsigned long numrecs ; /* number of 'records' allocated */
  184.     NC_array *dims ;
  185.     NC_array *attrs ;
  186.     NC_array *vars ;
  187. #ifdef HDF
  188.     int32 hdf_file;
  189.     int file_type;
  190.     int32 vgid;
  191.     int hdf_mode; /* mode we are attached for */
  192.     hdf_file_t cdf_fp; /* file pointer used for CDF files */
  193. #endif
  194. } NC ;
  195.  
  196. /* NC variable: description and data */
  197. typedef struct {
  198.     NC_string *name ;
  199.     NC_iarray *assoc ; /* user definition */
  200.     unsigned long *shape ; /* compiled info */
  201.     unsigned long *dsizes ; /* compiled info */
  202.     NC_array *attrs;
  203.     nc_type type ;        /* the discriminant */
  204.     unsigned long len ;        /* the total length originally allocated */
  205.     size_t szof ;        /* sizeof each value */
  206.     long begin ;  /* seek index, often an off_t */
  207. #ifdef HDF
  208.     NC *cdf;    /* handle of the file where this var belongs to  */
  209.     int32 vgid;     /* id of the variable's Vgroup */
  210.     uint16 data_ref;  /* ref of the variable's data storage (if exists) */
  211.     uint16 data_tag;  /* tag of the variable's data storage (if exists) */
  212.     uint16 ndg_ref;   /* ref of ndg for this dataset */
  213.     intn   data_offset; /* non-traditional data may not begin at 0 */
  214.     int32  block_size;  /* size of the blocks for unlimited dim. datasets */
  215.     int numrecs;  /* number of records this has been filled to */
  216.     int32 aid;    /* aid for DFTAG_SD data */
  217.     int32 HDFtype; /* type of this variable as HDF thinks */
  218.     int32 HDFsize; /* size of this variable as HDF thinks */
  219.     int32   is_ragged; /* BOOLEAN == is a ragged array */
  220.     int32 * rag_list;  /* size of ragged array lines */
  221.     int32   rag_fill;  /* last line in rag_list to be set */
  222.     vix_t * vixHead;   /* list of VXR records for CDF data storage */
  223. #endif
  224. } NC_var ;
  225.  
  226. #define IS_RECVAR(vp) \
  227.     ((vp)->shape != NULL ? (*(vp)->shape == NC_UNLIMITED) : 0 )
  228.  
  229. #define netCDF_FILE  0
  230. #define HDF_FILE     1
  231. #define CDF_FILE     2
  232.  
  233. extern const char *cdf_routine_name ; /* defined in lerror.c */
  234.  
  235.                /*  C D F 1 */
  236. #define    NCMAGIC    0x43444601
  237.                        /*  C D L 1 */
  238. #define    NCLINKMAGIC    0x43444c01
  239.  
  240. /* #ifndef HDF *//* HDF has already worked out if we have prototypes */
  241. #ifdef HDF
  242. #define PROTOTYPE
  243. #endif
  244. #undef PROTO
  245. #ifndef NO_HAVE_PROTOTYPES 
  246. #   define    PROTO(x)    x
  247. #else
  248. #   define    PROTO(x)    ()
  249. #endif
  250. /* #endif */ /* HDF */
  251.  
  252. #ifdef __cplusplus
  253. extern "C" {
  254. #endif
  255.  
  256. /* If using the real netCDF library and API (use -DHAVE_NETCDF)
  257.    need to mangle the HDF versions of netCDF API function names 
  258.    to not conflict w/ oriinal netCDF ones */
  259. #ifdef HAVE_NETCDF
  260. #define nc_serror        HNAME(nc_serror)
  261. #define NCadvise         HNAME(NCadvise)
  262. #define NC_computeshapes HNAME(NC_computeshapes)
  263. #define NC_xtypelen      HNAME(NC_xtypelen)
  264. #define NC_xlen_array    HNAME(NC_xlen_array)
  265. #define NC_xlen_attr     HNAME(NC_xlen_attr)
  266. #define NC_xlen_cdf      HNAME(NC_xlen_cdf)
  267. #define NC_xlen_dim      HNAME(NC_xlen_dim)
  268. #define NC_xlen_iarray   HNAME(NC_xlen_iarray)
  269. #define NC_xlen_string   HNAME(NC_xlen_string)
  270. #define NC_xlen_var      HNAME(NC_xlen_var)
  271. #define NCmemset         HNAME(NCmemset)
  272. #define NC_arrayfill     HNAME(NC_arrayfill)
  273. #define NC_copy_arrayvals HNAME(NC_copy_arrayvals)
  274. #define NC_free_array    HNAME(NC_free_array)
  275. #define NC_free_attr     HNAME(NC_free_attr)
  276. #define NC_free_cdf      HNAME(NC_free_cdf)
  277. #define NC_free_dim      HNAME(NC_free_dim)
  278. #define NC_free_iarray   HNAME(NC_free_iarray)
  279. #define NC_free_string   HNAME(NC_free_string)
  280. #define NC_free_var      HNAME(NC_free_var)
  281. #define NC_incr_array    HNAME(NC_incr_array)
  282. #define NC_dimid         HNAME(NC_dimid)
  283. #define NCcktype         HNAME(NCcktype)
  284. #define NC_indefine      HNAME(NC_indefine)
  285. #define xdr_cdf          HNAME(xdr_cdf)
  286. #define xdr_numrecs      HNAME(xdr_numrecs)
  287. #define xdr_shorts       HNAME(xdr_shorts)
  288. #define xdr_NC_array     HNAME(xdr_NC_array)
  289. #define xdr_NC_attr      HNAME(xdr_NC_attr)
  290. #define xdr_NC_dim       HNAME(xdr_NC_dim)
  291. #define xdr_NC_fill      HNAME(xdr_NC_fill)
  292. #define xdr_NC_iarray    HNAME(xdr_NC_iarray)
  293. #define xdr_NC_string    HNAME(xdr_NC_string)
  294. #define xdr_NC_var       HNAME(xdr_NC_var)
  295. #define NC_typelen       HNAME(NC_typelen)
  296. #define NC_check_id      HNAME(NC_check_id)
  297. #define NC_dup_cdf       HNAME(NC_dup_cdf)
  298. #define NC_new_cdf       HNAME(NC_new_cdf)
  299. #define NC_new_array     HNAME(NC_new_array)
  300. #define NC_re_array      HNAME(NC_re_array)
  301. #define NC_new_attr      HNAME(NC_new_attr)
  302. #define NC_findattr      HNAME(NC_findattr)
  303. #define NC_new_dim       HNAME(NC_new_dim)
  304. #define NC_new_iarray    HNAME(NC_new_iarray)
  305. #define NC_new_string    HNAME(NC_new_string)
  306. #define NC_re_string     HNAME(NC_re_string)
  307. #define NC_hlookupvar    HNAME(NC_hlookupvar)
  308. #define NC_new_var       HNAME(NC_new_var)
  309. #define NCvario          HNAME(NCvario)
  310. #define NCcoordck        HNAME(NCcoordck)
  311. #define xdr_NCvshort     HNAME(xdr_NCvshort)
  312. #define NC_dcpy          HNAME(NC_dcpy)
  313. #define NCxdrfile_sync   HNAME(NCxdrfile_sync)
  314. #define NCxdrfile_create HNAME(NCxdrfile_create)
  315. #ifdef HDF
  316. #define NCgenio          HNAME(NCgenio)      /* from putgetg.c */
  317. #define NC_var_shape     HNAME(NC_var_shape) /* from var.c */
  318. #endif
  319. #endif /* HAVE_NETCDF ie. NOT USING HDF version of netCDF ncxxx API */
  320.  
  321. extern void        nc_serror            PROTO((
  322.     const char *fmt,
  323.     ...
  324. )) ;
  325. extern void        NCadvise            PROTO((
  326.     int err,
  327.     const char *fmt,
  328.     ...
  329. )) ;
  330.  
  331. extern int        NC_computeshapes    PROTO((
  332.     NC        *handle
  333. ));
  334. extern int        NC_xtypelen        PROTO((
  335.     nc_type    type
  336. ));
  337. extern int        NC_xlen_array        PROTO((
  338.     NC_array    *array
  339. ));
  340. extern int        NC_xlen_attr        PROTO((
  341.     NC_attr    **app
  342. ));
  343. extern int        NC_xlen_cdf        PROTO((
  344.     NC        *cdf
  345. ));
  346. extern int        NC_xlen_dim        PROTO((
  347.     NC_dim    **dpp
  348. ));
  349. extern int        NC_xlen_iarray    PROTO((
  350.     NC_iarray    *iarray
  351. ));
  352. extern int        NC_xlen_string    PROTO((
  353.     NC_string    *cdfstr
  354. ));
  355. extern int        NC_xlen_var        PROTO((
  356.     NC_var    **vpp
  357. ));
  358.  
  359. extern char       *NCmemset        PROTO((
  360.     char    *s,
  361.     int        c,
  362.     int        n
  363. ));
  364.  
  365. extern void       NC_arrayfill        PROTO((
  366.     void    *lo,
  367.     size_t    len,
  368.     nc_type    type
  369. ));
  370. extern void       NC_copy_arrayvals    PROTO((
  371.     char    *target,
  372.     NC_array    *array
  373. ));
  374. extern int       NC_free_array        PROTO((
  375.     NC_array    *array
  376. ));
  377. extern int       NC_free_attr        PROTO((
  378.     NC_attr    *attr
  379. ));
  380. extern int       NC_free_cdf        PROTO((
  381.     NC        *handle
  382. ));
  383. extern int       NC_free_dim        PROTO((
  384.     NC_dim    *dim
  385. ));
  386. extern int       NC_free_iarray    PROTO((
  387.     NC_iarray    *iarray
  388. ));
  389. extern int       NC_free_string    PROTO((
  390.     NC_string    *cdfstr
  391. ));
  392. extern int       NC_free_var        PROTO((
  393.     NC_var    *var
  394. ));
  395.  
  396. extern Void      *NC_incr_array        PROTO((
  397.     NC_array    *array,
  398.     Void    *tail
  399. ));
  400.  
  401. extern int       NC_dimid               PROTO((
  402.     NC          *handle,
  403.     char        *name
  404. ));
  405. extern bool_t     NCcktype        PROTO((
  406.     nc_type    datatype
  407. ));
  408. extern bool_t     NC_indefine        PROTO((
  409.     int        cdfid,
  410.     bool_t    iserr
  411. ));
  412. extern bool_t     xdr_cdf        PROTO((
  413.     XDR        *xdrs,
  414.     NC        **handlep
  415. ));
  416. extern bool_t     xdr_numrecs        PROTO((
  417.     XDR        *xdrs,
  418.     NC        *handle
  419. ));
  420. extern bool_t     xdr_shorts        PROTO((
  421.     XDR        *xdrs,
  422.     short    *sp,
  423.     u_int    cnt
  424. ));
  425. extern bool_t     xdr_NC_array        PROTO((
  426.     XDR        *xdrs,
  427.     NC_array    **app
  428. ));
  429. extern bool_t     xdr_NC_attr        PROTO((
  430.     XDR        *xdrs,
  431.     NC_attr    **app
  432. ));
  433. extern bool_t     xdr_NC_dim        PROTO((
  434.     XDR        *xdrs,
  435.     NC_dim    **dpp
  436. ));
  437. extern bool_t     xdr_NC_fill        PROTO((
  438.     XDR        *xdrs,
  439.     NC_var    *vp
  440. ));
  441. extern bool_t     xdr_NC_iarray        PROTO((
  442.     XDR        *xdrs,
  443.     NC_iarray    **ipp
  444. ));
  445. extern bool_t     xdr_NC_string        PROTO((
  446.     XDR        *xdrs,
  447.     NC_string    **spp
  448. ));
  449. extern bool_t     xdr_NC_var        PROTO((
  450.     XDR        *xdrs,
  451.     NC_var    **vpp
  452. ));
  453.  
  454. extern size_t     NC_typelen        PROTO((
  455.     nc_type    type
  456. ));
  457.  
  458. extern NC        *NC_check_id        PROTO((
  459.     int        cdfid
  460. ));
  461. extern NC        *NC_dup_cdf        PROTO((
  462.     const char *name,
  463.     int     mode,
  464.     NC        *old
  465. ));
  466. extern NC        *NC_new_cdf        PROTO((
  467.     const char *name,
  468.     int        mode
  469. ));
  470. extern NC_array  *NC_new_array        PROTO((
  471.     nc_type    type,
  472.     unsigned    count,
  473.     const void    *values
  474. ));
  475. extern NC_array  *NC_re_array        PROTO((
  476.     NC_array    *old,
  477.     nc_type    type,
  478.     unsigned    count,
  479.     const void    *values
  480. ));
  481. extern NC_attr  *NC_new_attr        PROTO((
  482.     const char *name,
  483.     nc_type type,
  484.     unsigned count ,
  485.     const void *values
  486. ));
  487. extern NC_attr  **NC_findattr        PROTO((
  488.     NC_array    **ap,
  489.     const char    *name
  490. ));
  491. extern NC_dim    *NC_new_dim        PROTO((
  492.     const char    *name,
  493.     long    size
  494. ));
  495. extern NC_iarray *NC_new_iarray        PROTO((
  496.     unsigned    count,
  497.     const int        values[]
  498. ));
  499. extern NC_string *NC_new_string        PROTO((
  500.     unsigned    count,
  501.     const char    *str
  502. ));
  503. extern NC_string *NC_re_string        PROTO((
  504.     NC_string    *old,
  505.     unsigned    count,
  506.     const char    *str
  507. ));
  508. extern NC_var    *NC_hlookupvar        PROTO((
  509.     NC        *handle,
  510.     int        varid
  511. ));
  512. extern NC_var    *NC_new_var        PROTO((
  513.     const char    *name,
  514.     nc_type    type,
  515.     int        ndims,
  516.     const int        *dims
  517. ));
  518. extern int    NCvario            PROTO((
  519.     NC *handle,
  520.     int varid,
  521.     const long *start,
  522.     const long *edges,
  523.     void *values
  524. ));
  525. extern bool_t    NCcoordck    PROTO((
  526.     NC *handle,
  527.     NC_var *vp, 
  528.     const long *coords
  529. ));
  530. extern bool_t xdr_NCvshort    PROTO((
  531.         XDR *xdrs,
  532.         unsigned which,
  533.         short *values
  534. ));
  535. extern bool_t    NC_dcpy            PROTO((
  536.     XDR *target,
  537.     XDR *source,
  538.     long nbytes
  539. ));
  540. extern int NCxdrfile_sync
  541.     PROTO((XDR *xdrs));
  542.  
  543. extern int NCxdrfile_create
  544.     PROTO((XDR *xdrs,const char *path,int ncmode));
  545.  
  546. #ifdef HDF
  547. /* this routine is found in 'xdrposix.c' */
  548. extern void hdf_xdrfile_create
  549.     PROTO(( XDR *xdrs, int ncop));
  550.  
  551. extern intn hdf_fill_array
  552.     PROTO((Void  * storage,int32 len,Void  * value,int32 type));
  553.  
  554. extern intn hdf_get_data
  555.     PROTO((NC *handle,NC_var *vp));
  556.  
  557. extern int32 hdf_get_vp_aid
  558.     PROTO((NC *handle, NC_var *vp));
  559.  
  560. extern int hdf_map_type
  561.     PROTO((nc_type ));
  562.  
  563. extern nc_type hdf_unmap_type
  564.     PROTO((int ));
  565.  
  566. extern intn hdf_get_ref
  567.     PROTO((NC *,int ));
  568.  
  569. extern intn hdf_create_dim_vdata
  570.     PROTO((XDR *,NC *,NC_dim *));
  571.  
  572. extern intn hdf_create_compat_dim_vdata
  573.     PROTO((XDR *xdrs, NC *handle, NC_dim *dim, int32 dimval_ver));
  574.  
  575. extern intn hdf_write_attr
  576.     PROTO((XDR *,NC *,NC_attr **));
  577.  
  578. extern int32 hdf_write_dim
  579.     PROTO((XDR *,NC *,NC_dim **,int32));
  580.  
  581. extern int32 hdf_write_var
  582.     PROTO((XDR *,NC *,NC_var **));
  583.  
  584. extern intn hdf_write_xdr_cdf
  585.     PROTO((XDR *,NC **));
  586.  
  587. extern intn hdf_conv_scales
  588.     PROTO((NC **));
  589.  
  590. extern intn hdf_read_dims
  591.     PROTO((XDR *,NC *,int32 ));
  592.  
  593. extern NC_array *hdf_read_attrs
  594.     PROTO((XDR *,NC *,int32 ));
  595.  
  596. extern intn hdf_read_vars
  597.     PROTO((XDR *,NC *,int32 ));
  598.  
  599. extern intn hdf_read_xdr_cdf
  600.     PROTO((XDR *,NC **));
  601.  
  602. extern intn hdf_xdr_cdf
  603.     PROTO((XDR *,NC **));
  604.  
  605. extern intn hdf_vg_clobber
  606.     PROTO((NC *,int ));
  607.  
  608. extern intn hdf_cdf_clobber
  609.     PROTO((NC *));
  610.  
  611. extern intn hdf_close
  612.     PROTO((NC *));
  613.  
  614. extern intn hdf_read_sds_dims
  615.     PROTO((NC *));
  616.  
  617. extern intn hdf_read_sds_cdf
  618.     PROTO((XDR *,NC **));
  619.  
  620. extern intn SDPfreebuf PROTO((void));
  621.  
  622. extern intn NCgenio
  623.     PROTO((NC *handle, int varid, const long *start, const long *count,
  624.         const long *stride, const long *imap, void *values));
  625.  
  626. extern intn NC_var_shape
  627.     PROTO((NC_var *var,NC_array *dims));
  628.  
  629. /* CDF stuff. don't need anymore? -GV */
  630. extern nc_type cdf_unmap_type
  631.     PROTO((int type));
  632.  
  633. extern bool_t nssdc_read_cdf
  634.     PROTO((XDR *xdrs, NC **handlep));
  635.  
  636. extern bool_t nssdc_write_cdf
  637.    PROTO((XDR *xdrs, NC **handlep));
  638.  
  639. extern bool_t nssdc_xdr_cdf
  640.     PROTO((XDR *xdrs, NC **handlep));
  641.  
  642. #endif /* HDF */
  643.  
  644. #ifdef __cplusplus
  645. }
  646. #endif
  647.  
  648. #endif /* _LOCAL_NC_ */
  649.